* {
  font-family: Helvetica, "Hiragino Sans GB", "Microsoft Yahei", "微软雅黑",
    Arial, sans-serif;
}

html,
body {
  height: 100%;
}

body {
  background-color: #333;
  background-position: center center;
}

.danger-border {
  border-color: #d9534f !important;
}

.bg {
  position: fixed;
  top: -20px;
  bottom: -20px;
  left: -20px;
  right: -20px;
  z-index: -1;
  background-position: center;
}

.modal-dialog {
  margin-top: 200px;
}

.SpeedDialBox {
  max-width: 1200px;
  margin: 0 auto;
  padding: 50px 0 100px;
  display: flex;
  flex-wrap: wrap;

  .speeddial {
    margin-top: 20px;
    background-color: white;
    border-radius: 5px;
    overflow: hidden;
    transition: all 0.2s;
    cursor: pointer;

    &.move {
      cursor: move !important;

      a {
        cursor: move !important;
      }
    }

    &:hover,
    &:focus {
      text-decoration: none;
      box-shadow: 0 0 10px #333;

      span {
        text-decoration: none;
      }
    }

    .info {
      position: relative;
      display: flex;
      align-items: center;
      .block {
        flex: 1;
        transition: all 0.2s;
        display: flex;
        height: 52px;
        align-items: center;
        padding: 10px;
        color: #333;
        text-decoration: none;
        overflow: hidden;

        .icon {
          width: 32px;
          height: 32px;
          margin-right: 10px;
          overflow: hidden;

          .drag_handle {
            width: 32px;
            height: 32px;
            color: #333;
            fill: #333;

            path {
              fill: #333;
            }
          }

          .icon_img {
            // display         : none;
            width: 32px;
            height: 32px;
            background-color: transparent;
          }

          .word {
            display: inline-block;
            font-size: 24px;
            background-color: #0090ff;
            color: white;
            width: 32px;
            height: 32px;
            text-align: center;
            line-height: 32px;
            border-radius: 3px;
          }
        }

        .title {
          flex: 1;
          white-space: nowrap;
          font-size: 14px;
          text-overflow: ellipsis;
          overflow: hidden;
        }
      }

      .close_button {
        width: 28px;
        height: 32px;
        background: transparent;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        .iconfont {
          color: #eb3323;
        }
        cursor: pointer !important;

        img {
          width: 32px;
          height: 32px;
        }
      }
    }

    .other {
      height: 30px;
      display: flex;
      border-top: 1px solid #eee;

      .drag {
        width: 40px;
        padding-left: 10px;

        .drag_handle {
          max-width: 16px;
          max-height: 16px;
        }
      }

      .link {
        flex: 1;
        font-size: 12px;
        line-height: 28px;
        color: #999;
      }
    }
  }
}

.my-modal {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.7);
}

.switcher_box {
  display: flex;
  align-items: center;

  label {
    flex: 1;
  }

  .switcher {
    display: flex !important;
    justify-content: flex-end;
  }
}

.nav-item {
  cursor: pointer;
}

.sortable-chosen {
  opacity: 0.5;
}

.search_box {
  max-width: 900px;
  padding: 0 15px;
  margin: 50px auto 0;
  position: relative;

  .search_icon {
    position: absolute;
    left: 30px;
    top: 10px;
    width: 32px;
    height: 32px;
  }

  input {
    border-radius: 5px;
    max-width: 900px;
    height: 52px;
    padding-left: 60px;
  }

  button {
    position: absolute;
    right: 15px;
    top: 0;
    background: transparent;
    border: none;
    border-left: 1px solid #ccc;
    padding-left: 15px;
    padding-right: 18px;
    height: 52px;
  }
}

.topbar {
  padding: 20px;
  text-align: right;
  background: linear-gradient(to bottom, rgba(1, 1, 1, 0.3), transparent);

  button {
    color: white;
    font-size: 0;
    text-decoration: none;
    margin: 0 10px;
    padding: 5px 0;
    border: 0;
    border-bottom: 2px solid transparent;
    border-color: transparent;
    background-color: transparent;
    outline: none;
    transition: border-color 0.2s;
    .iconfont {
      font-size: 24px;
      vertical-align: middle;
      margin-right: 5px;
    }
    span {
      font-size: 18px;
      vertical-align: middle;
    }

    &:hover {
      border-color: white;
    }

    &:focus {
      outline: none;
    }
  }
}

.iconfont {
  font-size: 18px;
}

// 夜间模式
@media (prefers-color-scheme: dark) {
  .modal-dialog {
    .modal-header,
    .modal-footer {
      border-color: black;
    }
    .modal-content {
      color: #eee;
      background-color: rgba(52, 52, 52, 1);
    }
  }
  .form-control {
    background-color: rgba(38, 38, 38, 1);
    border-color: black;
    color: #eee;
    &::placeholder {
      color: #aaa;
    }
    &:focus {
      background-color: rgba(52, 52, 52, 1);
      border-color: black;
      color: #eee;
    }
  }
  .topbar {
    button {
      color: #eee;
      &:hover {
        border-color: white;
        color: white;
      }
    }
  }
  .bg {
    background-color: rgba(52, 52, 52, 0.5);
    background-blend-mode: darken;
  }
  .search_box {
    button {
      color: #eee;
      border-color: black;
    }
  }
  .SpeedDialBox {
    .speeddial {
      .info {
        background-color: rgba(52, 52, 52, 1);
        .block {
          .title {
            color: #eee;
          }
        }
      }
      .other {
        background-color: rgba(52, 52, 52, 1);
        border-color: black;
        .drag {
          .drag_handle {
            color: #eee;
          }
        }
      }
    }
  }
}
